{
g_clear_object (&child);
- if (!find_rev_in_remotes (self, rev, &child, error))
- goto out;
+ child = g_file_resolve_relative_path (priv->remote_heads_dir, rev);
- if (child == NULL)
+ if (!g_file_query_exists (child, NULL))
{
- if (!allow_noent)
+ g_clear_object (&child);
+
+ if (!find_rev_in_remotes (self, rev, &child, error))
+ goto out;
+
+ if (child == NULL)
{
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Rev '%s' not found", rev);
- goto out;
+ if (!allow_noent)
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ "Rev '%s' not found", rev);
+ goto out;
+ }
+ else
+ g_clear_object (&child);
}
- else
- g_clear_object (&child);
}
}
OstreeRepo *repo = NULL;
const char *remote;
const char *branch;
- char *remote_branch_ref_path = NULL;
char *key = NULL;
char *baseurl = NULL;
char *refpath = NULL;
g_free (original_rev);
g_free (baseurl);
g_free (refpath);
- g_free (remote_branch_ref_path);
g_clear_object (&soup);
if (base_uri)
soup_uri_free (base_uri);